package com.tencreat.domain.im.dto;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class OpenIMRegisterDTO {
    String secret;
    List<OpenIMUserDTO> users;

    public OpenIMRegisterDTO() {
    }

    public OpenIMRegisterDTO(String secret, String userId, String nickname, String faceURL) {
        this.secret = secret;
        ArrayList<OpenIMUserDTO> openIMUserDTOS = new ArrayList<>();
        OpenIMUserDTO openIMUserDTO = new OpenIMUserDTO(userId, nickname, faceURL);
        openIMUserDTOS.add(openIMUserDTO);
        this.users = openIMUserDTOS;
    }
}
